﻿
using Xacml.Core;
using System;
using System.Collections;
using System.Xml;

namespace Xacml.Core.Policy
{
  public class PolicyDocument : PolicyDocumentReadWrite
  {
    public override XacmlVersion Version
    {
      set
      {
        throw new NotSupportedException();
      }
    }

    public override bool IsValidDocument
    {
      set
      {
        throw new NotSupportedException();
      }
    }

    public override PolicySetElementReadWrite PolicySet
    {
      get
      {
        if (base.PolicySet != null)
          return (PolicySetElementReadWrite) new PolicySetElement(base.PolicySet.Id, base.PolicySet.Description, base.PolicySet.Target, base.PolicySet.Policies, base.PolicySet.PolicyCombiningAlgorithm, base.PolicySet.Obligations, base.PolicySet.XPathVersion, base.PolicySet.SchemaVersion);
        return (PolicySetElementReadWrite) null;
      }
      set
      {
        throw new NotSupportedException();
      }
    }

    public override PolicyElementReadWrite Policy
    {
      get
      {
        if (base.Policy != null)
          return (PolicyElementReadWrite) new PolicyElement(base.Policy.Id, base.Policy.Description, base.Policy.Target, base.Policy.Rules, base.Policy.RuleCombiningAlgorithm, base.Policy.Obligations, base.Policy.XPathVersion, base.Policy.CombinerParameters, base.Policy.RuleCombinerParameters, base.Policy.VariableDefinitions, base.Policy.SchemaVersion);
        return (PolicyElementReadWrite) null;
      }
      set
      {
        throw new NotSupportedException();
      }
    }

    public override IDictionary Namespaces
    {
      set
      {
        throw new NotSupportedException();
      }
    }

    public PolicyDocument(XmlReader reader, XacmlVersion schemaVersion)
      : base(reader, schemaVersion)
    {
    }

    public PolicyDocument(XacmlVersion schemaVersion)
      : base(schemaVersion)
    {
    }
  }
}
